namespace Logic.Map.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class addCarTypeCarriageInofLogCarBox : DbMigration
    {
        public override void Up()
        {
            CreateTable(
                "dbo.CarriageBox",
                c => new
                    {
                        F_Id = c.String(nullable: false, maxLength: 50),
                        F_CreatorUserId = c.String(maxLength: 50),
                        F_CreatorTime = c.DateTime(),
                        F_DeleteMark = c.Boolean(),
                        F_DeleteUserId = c.String(maxLength: 50),
                        F_DeleteTime = c.DateTime(),
                        F_LastModifyUserId = c.String(maxLength: 50),
                        F_LastModifyTime = c.DateTime(),
                        CarriageBoxID = c.String(maxLength: 150),
                        InitBelongCarriageId = c.String(maxLength: 150),
                        InitBelongTime = c.DateTime(),
                        ChangeBelongCarriageId = c.String(maxLength: 150),
                        ChangeBelongTime = c.DateTime(),
                        LeaveTime = c.DateTime(),
                        ThingsName = c.String(maxLength: 150),
                        FenHao = c.String(maxLength: 150),
                        Tarpaulin = c.String(maxLength: 150),
                        Remark = c.String(maxLength: 300),
                    })
                .PrimaryKey(t => t.F_Id);
            
            CreateTable(
                "dbo.CarriageInfoLog",
                c => new
                    {
                        F_Id = c.String(nullable: false, maxLength: 128),
                        F_CreatorUserId = c.String(maxLength: 50),
                        F_CreatorTime = c.DateTime(),
                        F_DeleteMark = c.Boolean(),
                        F_DeleteUserId = c.String(maxLength: 50),
                        F_DeleteTime = c.DateTime(),
                        F_LastModifyUserId = c.String(maxLength: 50),
                        F_LastModifyTime = c.DateTime(),
                        CarriageID = c.String(maxLength: 30),
                        CarType = c.String(maxLength: 100),
                        Remark = c.String(maxLength: 300),
                        State = c.Boolean(),
                        Capacity = c.Decimal(nullable: false, precision: 18, scale: 2),
                        PathWay = c.String(maxLength: 50),
                        ThingsName = c.String(maxLength: 100),
                        ArriveTime = c.DateTime(nullable: false),
                        ThingsCount = c.Decimal(precision: 18, scale: 2),
                        Weight = c.Decimal(precision: 18, scale: 2),
                        FenHao = c.String(maxLength: 50),
                        Customers = c.String(maxLength: 100),
                        OperationType = c.String(),
                    })
                .PrimaryKey(t => t.F_Id);
            
            CreateTable(
                "dbo.CarType",
                c => new
                    {
                        F_Id = c.String(nullable: false, maxLength: 128),
                        F_CreatorUserId = c.String(maxLength: 50),
                        F_CreatorTime = c.DateTime(),
                        F_DeleteMark = c.Boolean(),
                        F_DeleteUserId = c.String(maxLength: 50),
                        F_DeleteTime = c.DateTime(),
                        F_LastModifyUserId = c.String(maxLength: 50),
                        F_LastModifyTime = c.DateTime(),
                        Name = c.String(maxLength: 150),
                        orderByCode = c.Int(nullable: false),
                        IsUsing = c.Boolean(nullable: false),
                        Remark = c.String(maxLength: 300),
                    })
                .PrimaryKey(t => t.F_Id);
            
        }
        
        public override void Down()
        {
            DropTable("dbo.CarType");
            DropTable("dbo.CarriageInfoLog");
            DropTable("dbo.CarriageBox");
        }
    }
}
